//https://leetcode.cn/problems/middle-of-the-linked-list/submissions/539703396/

struct ListNode* middleNode(struct ListNode* head) {

    struct ListNode* slow, * fast;
    slow = fast = head;

    while (fast && fast->next)
    {
        slow = slow->next;
        fast = fast->next->next;
    }

    return slow;

}